<template>
  <div>
    <el-card class="box-card" shadow="always">
      <div slot="header" :class="$style.clearfix">
        <span>脚本设置</span>
      </div>
      <script-settings-header-form @onQuery="queryList" :querying="querying" :cityList="cityList"></script-settings-header-form>
      <el-divider></el-divider>
      <el-button type="warning" @click="onOpenEditModal(null)">新增</el-button>
    </el-card>
    <el-card class="box-card" shadow="always">
      <script-settings-list-table
        v-bind="list"
        @pageSizeChange="pageSizeChange"
        @pageNumChange="pageNumChange"
        @onOpenEditModal="onOpenEditModal"
        @onEnable="onEnable"
        @onDisable="onDisable"
      ></script-settings-list-table>
    </el-card>
    <!-- 详情   -->
    <script-settings-edit-modal
      ref="editModal"
      :visible="visible"
      :scriptFormValueString="JSON.stringify(formValue)"
      :cityList="cityList"
      width="40%"
      @resetTable="resetTable"
      @close="onClose"
    ></script-settings-edit-modal>
  </div>
</template>

<style lang="scss" module>
@import './index.module.scss';
</style>

<script>
import Index from './index.js';
export default Index;
</script>
